require("lualib_bundle");
__TS__SourceMapTraceBack(debug.getinfo(1).short_src, {["4"] = 2,["5"] = 2,["6"] = 2,["8"] = 2,["9"] = 7,["10"] = 7,["11"] = 7,["13"] = 8,["14"] = 7,["15"] = 15,["16"] = 16,["17"] = 17,["20"] = 20,["21"] = 21,["22"] = 22,["23"] = 22,["24"] = 22,["25"] = 23,["26"] = 24,["27"] = 25,["28"] = 22,["29"] = 22,["30"] = 15,["31"] = 2});
local ____exports = {}
____exports.default = __TS__Class()
local SyncUtil = ____exports.default
SyncUtil.name = "SyncUtil"
function SyncUtil.prototype.____constructor(self)
end
function SyncUtil.SyncData(key, data)
    if data == nil then
        data = ""
    end
    DzSyncData(key, data)
end
function SyncUtil.onSyncData(key, actionFunc)
    if isAsync then
        log.errorWithTraceBack("无法在异步中调用此方法！请在同步方法中执行！")
        return
    end
    local trigger = CreateTrigger()
    DzTriggerRegisterSyncData(trigger, key, false)
    TriggerAddAction(
        trigger,
        function()
            local triggerPlayer = DzGetTriggerSyncPlayer()
            local data = DzGetTriggerSyncData()
            actionFunc(nil, triggerPlayer, data)
        end
    )
end
____exports.default = SyncUtil
return ____exports
